<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="../../css/public.css" media="all">
    <style>
        body {
            background-color: #ffffff;
        }
    </style>
</head>

<body>
    <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
        <ul class="layui-tab-title">
            <li class="layui-this">第一轮</li>
            <li>第二轮第一问</li>
            <li>第二轮第二问</li>
            <li>第三轮</li>
        </ul>
        <div class="layui-tab-content" id="content0">
            <!-- 表格 -->
            <table class="layui-hide" id="currentTableId1" lay-filter="currentTableFilter1"></table>
        </div>
        <div class="layui-tab-content" id="content1" style="display:none ;">
            <!-- 表格 -->
            <table class="layui-hide" id="currentTableId2" lay-filter="currentTableFilter2"></table>
        </div>
        <div class="layui-tab-content" id="content2" style="display:none ;">
            <!-- 表格 -->
            <table class="layui-hide" id="currentTableId3" lay-filter="currentTableFilter3"></table>
        </div>
        <div class="layui-tab-content" id="content3" style="display:none ;">
            <!-- 表格 -->
            <table class="layui-hide" id="currentTableId4" lay-filter="currentTableFilter4"></table>
        </div>
    </div>
    <script src="../../lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
    <script src="js/echarts.js" ,type="text/javascript"></script>
    <script src="js/jquery-3.1.1.min.js" ,type="text/javascript"></script>
    <script>
        layui.use(['form'], function () {
            var form = layui.form,
                layer = layui.layer,
                table = layui.table,
                $ = layui.$;
            table.render({
                elem: '#currentTableId1',
                url: '/answer1',
                toolbar: '#toolbarDemo',
                defaultToolbar: ['filter', 'exports', 'print'],
                cols: [
                    [{
                            type: "checkbox",
                            width: 50
                        },
                        {
                            field: 'expert_id',
                            minWidth: 150,
                            title: '专家编号',
                            sort: true
                        },
                        {
                            field: 'area',
                            minWidth: 150,
                            title: '地区'
                        },
                        {
                            field: 'des',
                            minWidth: 150,
                            title: '疫情严重情况'
                        },
                        {
                            field: 'hs',
                            minWidth: 150,
                            title: '核酸频率'
                        },
                        {
                            field: 'out',
                            title: '限制出行情况',
                            minWidth: 150
                        }
                    ]
                ],
                limits: [20],
                limit: 20,
                page: true,
                skin: 'line'
            });
            table.render({
                elem: '#currentTableId2',
                url: '/getAnswer2_1',
                toolbar: '#toolbarDemo',
                defaultToolbar: ['filter', 'exports', 'print'],
                cols: [
                    [{
                            type: "checkbox",
                            width: 50
                        },
                        {
                            field: 'expert_id',
                            minWidth: 150,
                            title: '专家编号',
                            sort: true
                        },
                        {
                            field: 'n21',
                            minWidth: 150,
                            title: '21天内所在地无病历概率',
                            align:'center'
                        },
                        {
                            field: 'n14',
                            minWidth: 150,
                            title: '14天内所在地无病历概率',
                            align:'center'
                        },
                        {
                            field: 'n7',
                            minWidth: 150,
                            title: '7天内所在地无病历概率',
                            align:'center'
                        },
                        {
                            field: 'fam',
                            title: '熟悉程度',
                            minWidth: 150,
                            align:'center'
                        }
                    ]
                ],
                limits: [20],
                limit: 20,
                page: true,
                skin: 'line'
            });
            table.render({
                elem: '#currentTableId3',
                url: '/getAnswer2_2',
                toolbar: '#toolbarDemo',
                defaultToolbar: ['filter', 'exports', 'print'],
                cols: [
                    [{
                            type: "checkbox",
                            width: 50
                        },
                        {
                            field: 'expert_id',
                            minWidth: 150,
                            title: '专家编号',
                            sort: true
                        },
                        {
                            field: 'g147',
                            width: 250,
                            title: '14天集中隔离+7天宿舍隔离概率',
                            align:'center'
                        },
                        {
                            field: 'g77',
                            width: 250,
                            title: '7天集中隔离+7天宿舍隔离概率',
                            align:'center'
                        },
                        {
                            field: 'g07',
                            minWidth: 150,
                            title: '7天宿舍隔离概率',
                            align:'center'
                        },
                        {
                            field: 'gno',
                            minWidth: 150,
                            title: '不隔离概率',
                            align:'center'
                        },
                        {
                            field: 'fam',
                            title: '熟悉程度',
                            minWidth: 150,
                            align:'center'
                        }
                    ]
                ],
                limits: [20],
                limit: 20,
                page: true,
                skin: 'line'
            });
            table.render({
                elem: '#currentTableId4',
                url: '/getAnswer3',
                toolbar: '#toolbarDemo',
                defaultToolbar: ['filter', 'exports', 'print'],
                cols: [
                    [{
                            type: "checkbox",
                            width: 50
                        },
                        {
                            field: 'expert_id',
                            minWidth: 150,
                            title: '专家编号',
                            sort: true
                        },
                        {
                            field: 'byes',
                            minWidth: 150,
                            title: '正常返校概率',
                            align:'center'
                        },
                        {
                            field: 'b10',
                            minWidth: 150,
                            title: '10月返校概率',
                            align:'center'
                        },
                        {
                            field: 'b11',
                            minWidth: 150,
                            title: '11月返校概率',
                            align:'center'
                        },
                        {
                            field: 'b12',
                            minWidth: 150,
                            title: '12月返校概率',
                            align:'center'
                        },
                        {
                            field: 'bno',
                            minWidth: 150,
                            title: '不返校概率',
                            align:'center'
                        },
                        {
                            field: 'fam',
                            title: '熟悉程度',
                            minWidth: 150,
                            align:'center'
                        }
                    ]
                ],
                limits: [20],
                limit: 20,
                page: true,
                skin: 'line'
            });
            $('.layui-tab-title').children('li').on('click', function () {
                var index = $('.layui-tab-title').children('li').index(this);
                for (var i = 0; i < 4; i++) {
                    if (i == index) {
                        $('.layui-tab-content').css('display', 'none');
                        var name = '#' + 'content' + i;
                        $(name).css('display', 'block');
                    }
                }
            })

        })
    </script>
</body>

</html>